﻿@model GoPlay.Models.Game

@{
    ViewBag.Title = "Change Game settings";
}

<h2>Change Game settings</h2>

@if (Session["FlashSuccess"] != null)
    {
        <div class="alert alert-success">
            <button type="button" class="close" data-dismiss="alert">×</button>
            <h4>Success</h4>
            @Session["FlashSuccess"]
            @{
                Session["FlashSuccess"] = null;
            }
        </div>
    }

@if (Session["FlashError"] != null)
    {
        <div class="alert alert-error">
            <button type="button" class="close" data-dismiss="alert">×</button>
            <h4>Oops</h4>
            @Session["FlashError"]
            @{
                Session["FlashError"] = null;
            }
        </div>
    }

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Game</legend>

        
        <input type="hidden" id="UserId" name="UserId" value="@Session["UserId"]" />

        <div class="editor-label">
            @Html.LabelFor(model => model.Date)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Date)
            @Html.ValidationMessageFor(model => model.Date)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Time)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Time)
            @Html.ValidationMessageFor(model => model.Time)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.GF)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.GF)
            @Html.ValidationMessageFor(model => model.GF)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.GA)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.GA)
            @Html.ValidationMessageFor(model => model.GA)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Decision)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Decision)
            @Html.ValidationMessageFor(model => model.Decision)
        </div>

        <br />

        <p>
            <input type="submit" value="Save" class="btn btn-large btn-success" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}


          
        @Html.HiddenFor(model => model.Id)


